package com.xiaoyu.lanling.feature.chat.viewholder.messageclick;

import android.view.View;

import com.xiaoyu.lanling.feature.chat.model.message.ChatMessageReceiveVideoItem;
import com.xiaoyu.lanling.util.ViewTagUtil;

public class ChatMessageAvatarItemClickHandler {

    public static final View.OnLongClickListener receiveVideoOnLongClickListener = v -> {
        ChatMessageReceiveVideoItem itemData = ViewTagUtil.getTag(v, ChatMessageReceiveVideoItem.class);
        if (itemData == null) {
            return false;
        }
        return true;
    };

    public static void bindReceiveImageItemLongClickForViewAndData(View view, ChatMessageReceiveVideoItem itemData) {
        view.setOnLongClickListener(receiveVideoOnLongClickListener);
        ViewTagUtil.setViewTagForClick(view, itemData);
    }
}
